{if $paytype == 1}
<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/> 
    <title>团购-支付</title>
    {if is_weixin()}
    <script type="text/javascript">
    (function () {

      var ie = !!(window.attachEvent && !window.opera);

      var wk = /webkit\/(\d+)/i.test(navigator.userAgent) && (RegExp.$1 < 525);

      var fn = [];

      var run = function () { for (var i = 0; i < fn.length; i++) fn[i](); };

      var d = document;

      d.ready = function (f) {

        if (!ie && !wk && d.addEventListener)

          return d.addEventListener('DOMContentLoaded', f, false);

        if (fn.push(f) > 1) return;

        if (ie)

          (function () {

            try { d.documentElement.doScroll('left'); run(); }

            catch (err) { setTimeout(arguments.callee, 0); }

          })();

        else if (wk)

          var t = setInterval(function () {

            if (/^(loaded|complete)$/.test(d.readyState))

              clearInterval(t), run();

          }, 0);

      };

    })();

    document.ready(function(){
      callpay();
    });
    //调用微信JS api 支付
    function jsApiCall()
    {
        WeixinJSBridge.invoke(
            'getBrandWCPayRequest',{$wechat},
            function(res){
                WeixinJSBridge.log(res.err_msg);
                alert(res.err_code+res.err_desc+res.err_msg);
            }
        );
    }

    function callpay()
    {
        if (typeof WeixinJSBridge == "undefined"){
            if( document.addEventListener ){
                document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
            }else if (document.attachEvent){
                document.attachEvent('WeixinJSBridgeReady', jsApiCall); 
                document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
            }
        }else{
            jsApiCall();
        }
    }
    </script>
    {/if}
    <style type="text/css">
        /* CSS RESET */
        * { padding: 0; margin: 0; }
        body { font: 12px "微软雅黑", Arial; background: #efeff4; min-width: 320px; max-width: 640px; color: #000; }
        a { text-decoration: none; color: #666666; }
        a, img { border: none; }
        img { vertical-align: middle; }
        ul, li { list-style: none; }
        em, i { font-style: normal; }
        .clear { clear: both }
        .clear_wl:after { content: "."; height: 0; visibility: hidden; display: block; clear: both; }
        .fl { float: left }
        .fr { float: right }
        .all_w { width: 91.3%; margin: 0 auto; }
        /*基础字体属性*/
        .f10 { font-size: 10px }
        .f11 { font-size: 11px }
        .f12 { font-size: 12px }
        .f14 { font-size: 14px }
        .f13 { font-size: 13px }
        .f16 { font-size: 16px }
        .f18 { font-size: 18px }
        .f20 { font-size: 20px }
        .f22 { font-size: 22px }
        .f24 { font-size: 24px }
        .f26 { font-size: 26px }
        .f28 { font-size: 28px }
        .f32 { font-size: 32px }
        .fb { font-weight: bold }
        /********/
        .header { background: #393a3e; color: #f5f7f6; height: auto; overflow: hidden; }
        .gofh { float: left; height: 45px; display: -webkit-box; -webkit-box-orient: horizontal; -webkit-box-pack: center; -webkit-box-align: center; }
        .gofh a { padding-right: 10px; border-right: 1px solid #2e2f33; }
        .gofh a img { width: 40%; }
        .ttwenz { float: left; height: 45px; }
        .ttwenz h4 { font-size: 16px; font-weight: 400; margin-top: 2px; }
        .ttwenz h5 { font-size: 12px; font-weight: 400; color: #6c7071; }
        .wenx_xx { text-align: center; font-size: 16px; padding: 18px 0; }
        .wenx_xx .wxzf_price { font-size: 45px; }
        .skf_xinf { height: 43px; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; line-height: 43px; background: #FFF; font-size: 12px; overflow: hidden; }
        .skf_xinf .bt { color: #767676; float: left; }
        .ljzf_but { border-radius: 3px; height: 45px; line-height: 45px; background: #44bf16; display: block; text-align: center; font-size: 16px; margin-top: 14px; color: #fff; }
        /**/
        .ftc_wzsf { display:none; width: 100%; height: 100%; position: fixed; z-index: 999; top: 0; left: 0; }
        .ftc_wzsf .hbbj { width: 100%; height: 100%; position: absolute; z-index: 8; background: #000; opacity: 0.4; top: 0; left: 0; }
        .ftc_wzsf .srzfmm_box { position: absolute; z-index: 10; background: #f8f8f8; width: 88%; left: 50%; margin-left: -44%; top: 25px; }
        .qsrzfmm_bt { font-size: 16px; border-bottom: 1px solid #c9daca; overflow: hidden; }
        .qsrzfmm_bt a { display: block; width: 10%; padding: 10px 0; text-align: center; }
        .qsrzfmm_bt img.tx { width: 10%; padding: 10px 0; }
        .qsrzfmm_bt span { padding: 15px 5px; }
        .zfmmxx_shop { text-align: center; font-size: 12px; padding: 10px 0; overflow: hidden; }
        .zfmmxx_shop .mz { font-size: 14px; float: left; width: 100%; }
        .zfmmxx_shop .wxzf_price { font-size: 24px; float: left; width: 100%; }
        .blank_yh { width: 89%; margin: 0 auto; line-height: 40px; display: block; color: #636363; font-size: 16px; padding: 5px 0; overflow: hidden; border-bottom: 1px solid #e6e6e6; border-top: 1px solid #e6e6e6; }
        .blank_yh img { height: 40px; }
        .ml5 { margin-left: 5px; }
        .mm_box { width: 89%; margin: 10px auto; height: 40px; overflow: hidden; border: 1px solid #bebebe; }
        .mm_box li { border-right: 1px solid #efefef; height: 40px; float: left; width: 16.3%; background: #FFF; }
        .mm_box li.mmdd{ background:#FFF url(../images/dd_03.jpg) center no-repeat ; background-size:25%;}
        .mm_box li:last-child { border-right: none; }
        .xiaq_tb { padding: 5px 0; text-align: center; border-top: 1px solid #dadada; }
        .numb_box { position: absolute; z-index: 10; background: #f5f5f5; width: 100%; bottom: 0px; }
        .nub_ggg { border: 1px solid #dadada; overflow: hidden; border-bottom: none; }
        .nub_ggg li { width: 33.3333%; border-bottom: 1px solid #dadada; float: left; text-align: center; font-size: 22px; }
        .nub_ggg li a { display: block; color: #000; height: 50px; line-height: 50px; overflow: hidden; }
        .nub_ggg li a:active  { background: #e0e0e0;}
        .nub_ggg li a.zj_x { border-left: 1px solid #dadada; border-right: 1px solid #dadada; }
        .nub_ggg li span { display: block; color: #e0e0e0; background: #e0e0e0; height: 50px; line-height: 50px; overflow: hidden; }
        .nub_ggg li span.del img { width: 30%; }

        .fh_but{ position:absolute; right:0px; top:12px; font-size:14px; color:#20d81f;}
        .zfcg_box{ background:#f2f2f2;  height: 56px; line-height:56px;   font-size:20px; color:#1ea300; }
        .zfcg_box img{ width:10%;}

        .cgzf_info{ background:#FFF; border-top:1px solid #dfdfdd; }

        .spxx_shop{ background:#FFF; margin-left:4.35%; border-top:1px solid #dfdfdd; padding:10px 0; }
        .spxx_shop td{ color:#7b7b7b; font-size:14px; padding:10px 0;}

        .wzxfcgde_tb{ position:fixed; width:100%; z-index:999; bottom:20px; text-align:center;}
        .wzxfcgde_tb img{ width:20.6%;}
        .mlr_pm{margin-right:4.35%;}
    </style>
</head>
<body>
<div class="header">
  <div class="all_w ">
    <div class="gofh">  </div>
    <div class="ttwenz">
      <h4>确认交易</h4>
      <h5>安全支付</h5>
    </div>
  </div>
</div>
<div class="wenx_xx">
  <div class="mz">{$params['title']}</div>
  <div class="wxzf_price">￥11.90</div>
</div>
<div class="skf_xinf">
  <div class="all_w"> <span class="bt">收款方</span> <span class="fr">{$shopset['name']}</span> </div>
</div>
{if is_weixin()}
<a href="javascript:void(0);" class="ljzf_but all_w" onclick="callpay()">立即支付</a> 
{else}
<a href="{$wechat['mweb_url']}" class="ljzf_but all_w">立即支付</a> 
{/if}
</body>
</html>
{elseif $paytype == 2}
{if is_weixin()}
{include file='_header'}
<style>
    .fui-content {background-color: #019fe8; background-image: url("/public/static/images/alipay.png"); background-repeat: no-repeat; background-size: 80%; background-position: center 8rem;}
    .layer {position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-image: url("/public/static/images/guide.png"); background-repeat: no-repeat; background-position: top right; background-size: 28%; color: #fff;}
    .layer .text{height: 10rem; width: 13rem; color: #fff; position: absolute; top: 2.5rem; left: 50%; margin-left: -5.5rem; font-size: 1.1rem;}
    .layer .tip {height: 1rem; left: 0; right: 0; bottom: 3rem; position: absolute; font-size: 0.8rem; text-align: center;}
</style>

<div class='fui-page  fui-page-current order-create-page'>
    <div class='fui-content'>
        <div class="layer">
            <div class="text">
                <p>① 请点击右上角</p>
                <p>② 通过【浏览器打开】</p>
                <p>③ 完成支付</p>
                <p>④ 返回此页面</p>
            </div>
            <div class="tip">TIP: 支付完成后自动跳转</div>
        </div>
    </div>
</div>
<script>
    require(['core'], function (core) {
        var orderid = "{$_GET['orderid']}";
        var type = "{$_GET['type']}";
        var id = "{$_GET['id']}";
        var logid = "{$_GET['logid']}";
        if(type==0){
            var url = core.getUrl('order/pay/orderstatus');
            var data = {id: orderid};
            var url_return = core.getUrl('order/pay/success', {id: orderid});
        }else if(type == 20){
            var url = core.getUrl('creditshop/detail/lottery');
            var data = {id: id,logid:logid };
            var url_return = core.getUrl('creditshop/log');
        }else if(type == 21){
            var url = core.getUrl('creditshop/log/payresult');
            var data = {id: id};
            var url_return = core.getUrl('creditshop/log/detail', {id: id});
        }else if(type == 6){
            var url = core.getUrl('threen/register/lottery');
            var data = {id: logid};
            var url_return = core.getUrl('threen');
        }else if(type == 22){
            var url = core.getUrl('membercard/detail/membercard_complete');
            var data = {id: logid};
            var url_return = core.getUrl('membercard/detail/membercard_complete');
        }else{
            var url = core.getUrl('member/recharge/getstatus');
            var data = {logno: orderid };
            var url_return = core.getUrl('member');
        }
        var settime = setInterval(function () {
            //alert(url_return);
            $.getJSON(url, data, function (ret) {
                if (ret.status >=1) {
                    clearInterval(settime);
                    location.href = url_return;
                }else{
                    //FoxUI.toast.show(JSON.stringify(ret));
                }
            })
        }, 1000);
    })
</script>
{include file='_footer'}
{else}
<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/> 
    <title>支付宝支付样例-支付</title>
    <style type="text/css">
        /* CSS RESET */
        * { padding: 0; margin: 0; }
        body { font: 12px "微软雅黑", Arial; background: #efeff4; min-width: 320px; max-width: 640px; color: #000; }
        a { text-decoration: none; color: #666666; }
        a, img { border: none; }
        img { vertical-align: middle; }
        ul, li { list-style: none; }
        em, i { font-style: normal; }
        .clear { clear: both }
        .clear_wl:after { content: "."; height: 0; visibility: hidden; display: block; clear: both; }
        .fl { float: left }
        .fr { float: right }
        .all_w { width: 91.3%; margin: 0 auto; }
        /*基础字体属性*/
        .f10 { font-size: 10px }
        .f11 { font-size: 11px }
        .f12 { font-size: 12px }
        .f14 { font-size: 14px }
        .f13 { font-size: 13px }
        .f16 { font-size: 16px }
        .f18 { font-size: 18px }
        .f20 { font-size: 20px }
        .f22 { font-size: 22px }
        .f24 { font-size: 24px }
        .f26 { font-size: 26px }
        .f28 { font-size: 28px }
        .f32 { font-size: 32px }
        .fb { font-weight: bold }
        /********/
        .header { background: #393a3e; color: #f5f7f6; height: auto; overflow: hidden; }
        .gofh { float: left; height: 45px; display: -webkit-box; -webkit-box-orient: horizontal; -webkit-box-pack: center; -webkit-box-align: center; }
        .gofh a { padding-right: 10px; border-right: 1px solid #2e2f33; }
        .gofh a img { width: 40%; }
        .ttwenz { float: left; height: 45px; }
        .ttwenz h4 { font-size: 16px; font-weight: 400; margin-top: 2px; }
        .ttwenz h5 { font-size: 12px; font-weight: 400; color: #6c7071; }
        .wenx_xx { text-align: center; font-size: 16px; padding: 18px 0; }
        .wenx_xx .wxzf_price { font-size: 45px; }
        .skf_xinf { height: 43px; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; line-height: 43px; background: #FFF; font-size: 12px; overflow: hidden; }
        .skf_xinf .bt { color: #767676; float: left; }
        .ljzf_but { border-radius: 3px; height: 45px; line-height: 45px; background: #44bf16; display: block; text-align: center; font-size: 16px; margin-top: 14px; color: #fff; }
        /**/
        .ftc_wzsf { display:none; width: 100%; height: 100%; position: fixed; z-index: 999; top: 0; left: 0; }
        .ftc_wzsf .hbbj { width: 100%; height: 100%; position: absolute; z-index: 8; background: #000; opacity: 0.4; top: 0; left: 0; }
        .ftc_wzsf .srzfmm_box { position: absolute; z-index: 10; background: #f8f8f8; width: 88%; left: 50%; margin-left: -44%; top: 25px; }
        .qsrzfmm_bt { font-size: 16px; border-bottom: 1px solid #c9daca; overflow: hidden; }
        .qsrzfmm_bt a { display: block; width: 10%; padding: 10px 0; text-align: center; }
        .qsrzfmm_bt img.tx { width: 10%; padding: 10px 0; }
        .qsrzfmm_bt span { padding: 15px 5px; }
        .zfmmxx_shop { text-align: center; font-size: 12px; padding: 10px 0; overflow: hidden; }
        .zfmmxx_shop .mz { font-size: 14px; float: left; width: 100%; }
        .zfmmxx_shop .wxzf_price { font-size: 24px; float: left; width: 100%; }
        .blank_yh { width: 89%; margin: 0 auto; line-height: 40px; display: block; color: #636363; font-size: 16px; padding: 5px 0; overflow: hidden; border-bottom: 1px solid #e6e6e6; border-top: 1px solid #e6e6e6; }
        .blank_yh img { height: 40px; }
        .ml5 { margin-left: 5px; }
        .mm_box { width: 89%; margin: 10px auto; height: 40px; overflow: hidden; border: 1px solid #bebebe; }
        .mm_box li { border-right: 1px solid #efefef; height: 40px; float: left; width: 16.3%; background: #FFF; }
        .mm_box li.mmdd{ background:#FFF url(../images/dd_03.jpg) center no-repeat ; background-size:25%;}
        .mm_box li:last-child { border-right: none; }
        .xiaq_tb { padding: 5px 0; text-align: center; border-top: 1px solid #dadada; }
        .numb_box { position: absolute; z-index: 10; background: #f5f5f5; width: 100%; bottom: 0px; }
        .nub_ggg { border: 1px solid #dadada; overflow: hidden; border-bottom: none; }
        .nub_ggg li { width: 33.3333%; border-bottom: 1px solid #dadada; float: left; text-align: center; font-size: 22px; }
        .nub_ggg li a { display: block; color: #000; height: 50px; line-height: 50px; overflow: hidden; }
        .nub_ggg li a:active  { background: #e0e0e0;}
        .nub_ggg li a.zj_x { border-left: 1px solid #dadada; border-right: 1px solid #dadada; }
        .nub_ggg li span { display: block; color: #e0e0e0; background: #e0e0e0; height: 50px; line-height: 50px; overflow: hidden; }
        .nub_ggg li span.del img { width: 30%; }

        .fh_but{ position:absolute; right:0px; top:12px; font-size:14px; color:#20d81f;}
        .zfcg_box{ background:#f2f2f2;  height: 56px; line-height:56px;   font-size:20px; color:#1ea300; }
        .zfcg_box img{ width:10%;}

        .cgzf_info{ background:#FFF; border-top:1px solid #dfdfdd; }

        .spxx_shop{ background:#FFF; margin-left:4.35%; border-top:1px solid #dfdfdd; padding:10px 0; }
        .spxx_shop td{ color:#7b7b7b; font-size:14px; padding:10px 0;}

        .wzxfcgde_tb{ position:fixed; width:100%; z-index:999; bottom:20px; text-align:center;}
        .wzxfcgde_tb img{ width:20.6%;}
        .mlr_pm{margin-right:4.35%;}
    </style>
</head>
<body>
<div class="header">
  <div class="all_w ">
    <div class="gofh">  </div>
    <div class="ttwenz">
      <h4>确认交易</h4>
      <h5>支付宝安全支付</h5>
    </div>
  </div>
</div>
<div class="wenx_xx">
  <div class="mz">{$params['title']}</div>
  <div class="wxzf_price">￥11.90</div>
</div>
<div class="skf_xinf">
  <div class="all_w"> <span class="bt">收款方</span> <span class="fr">{$shopset['name']}</span> </div>
</div>
<a href="{$alipay}" class="ljzf_but all_w">立即支付</a> 
</body>
</html>
{/if}
{/if}